﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PackageTime.aspx.cs" Inherits="famails.BackEnd.page.PackageTime" MasterPageFile="~/Master.Master" %>


<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div style="width:100%;padding:10px;">

<div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="border:1px solid #333;padding:0px;margin-bottom:10px;">
    <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="padding:10px 20px;background:#000;color:#fff;font-size:18px;font-weight:bold;position:relative;">   
        Thông tin gói thời gian
        <asp:HiddenField ID="hdfId" runat="server" /> 
    </div>
    <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="height: auto;padding:10px;">
			  <asp:Panel Visible="false" ID="pnError" runat="server">
                <div class="error-box round">
                    <asp:Label ID="lblError"  runat="server" Text=""></asp:Label> 
                </div>
              </asp:Panel>
              <asp:Panel Visible="false" ID="pnSuccess" runat="server">
                <div class="confirmation-box round">
                    <asp:Label ID="lblSuccess"  runat="server" Text=""></asp:Label> 
                </div>
              </asp:Panel>
    </div>
            <div class="col-md-4 col-xs-12 col-sm-4 col-lg-4" style="height: auto;padding:10px;position:relative;">
                <fieldset>
                    <p>
                        <label for="simple-input" style="font-weight: bolder; text-transform: none">
                            Thời gian</label>
                        <asp:TextBox ID="txtthoigian" CssClass="form-control" style="border:1px solid #333;border-radius:0px;" 
                        runat="server"></asp:TextBox><span style="position:absolute;right:20px;top:47%;">Tháng</span>
                    </p>
                </fieldset>
            </div>
            <div class="col-md-4 col-xs-12 col-sm-4 col-lg-4" style="height: auto;padding:10px;position:relative;">
                <fieldset>
                    <p>
                        <label for="simple-input" style="font-weight: bolder; text-transform: none">
                            Discount</label>
                        <asp:TextBox ID="txtdiscount" CssClass="form-control" style="border:1px solid #333;border-radius:0px;" 
                        runat="server"></asp:TextBox><span style="position:absolute;right:20px;top:47%;">%</span>
                    </p>
                </fieldset>
            </div>
            <div class="col-md-4 col-xs-12 col-sm-4 col-lg-4" style="height: auto;padding:30px;">
                <fieldset>
                        <button runat="server" class="btn" style="float:left;margin-right:10px;background:#333;color:#fff;text-align:center;padding:6px 15px;border-radius:0px;" 
                            onserverclick="btnSave_Click">
                            <i style="margin-right:10px;" class="fa fa-upload"></i> Cập nhật
                        </button>
                </fieldset>
            </div>
</div>
        <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="border:1px solid #333;padding:0px;margin-bottom:10px;">
            <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="padding:10px 20px;background:#000;color:#fff;font-size:18px;font-weight:bold;position:relative;">   
               Danh sách gói thời gian
            </div>
            <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="height: auto;padding:10px;">
                <fieldset>
                    <div class=" table-responsive">
                    <table class="table table-striped table-bordered table-hover" id="dataTables-example">
                        <thead>
                            <tr>
                                <th>Thời gian</th>
                                <th>Discount</th>
                                <th style="width:100px;">Tùy chỉnh</th>
                            </tr>
                        </thead>
                        <tbody>
                    <asp:Repeater ID="dtfunction" runat="server">
                         <ItemTemplate>
                            <tr>
                                <td>
                                    <asp:Label ID="lblAttr" runat="server" Text='<%# Eval("monthCount") %>' ></asp:Label>
                                </td>
                                <td>
                                    <asp:Label ID="lblGmail" runat="server" Text='<%# Eval("discount") %>'></asp:Label>
                                </td>
                                <td style="text-align:center;">
                                        <asp:ImageButton ID="btnEdit" runat="server" ImageUrl="../resource/images/edit-validated-icon.png"
                                              CommandArgument='<%# Eval("packageTimeId") %>' OnClick="btnEdit_Click"  />
                                                <asp:ImageButton ID="btnDelete" runat="server" ImageUrl="../resource/images/Delete-icon.png"
                                                    CommandArgument='<%# Eval("packageTimeId") %>'
                                                     OnClientClick="return confirmDelete('Bạn có chắc rằng sẽ xóa thuộc tính này không ?')" OnClick="btnDelete_Click"  /> 
                                </td>
                            </tr>     
                         </ItemTemplate>
                     </asp:Repeater>
                        </tbody>
                    </table>
                    </div>
                </fieldset>
            </div>
        </div>
</div>
<script>
    $(document).ready(function () {
        $('#dataTables-example').dataTable();
    });
</script>
</asp:Content>

